<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Autovermietung: CarHire Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Autovermietung
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_car_hire.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_car_hire-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">CarHire Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Header for the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a> class.  
 <a href="class_car_hire.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_car_hire_8h_source.html">CarHire.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for CarHire:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_car_hire.png" usemap="#CarHire_map" alt=""/>
  <map id="CarHire_map" name="CarHire_map">
<area href="class_object.html" title="Header for the Object class." alt="Object" shape="rect" coords="0,0,57,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2a854d25beaa86f93eeaa88eb409f9d1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_car_hire.html#a2a854d25beaa86f93eeaa88eb409f9d1">Add</a> (<a class="el" href="class_i_car.html">ICar</a> *car)</td></tr>
<tr class="memdesc:a2a854d25beaa86f93eeaa88eb409f9d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a new <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> to the car rental.  <a href="#a2a854d25beaa86f93eeaa88eb409f9d1"></a><br/></td></tr>
<tr class="separator:a2a854d25beaa86f93eeaa88eb409f9d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a963e57679d3ed4f5af7a3a0a9cd0c505"><td class="memItemLeft" align="right" valign="top">TCars&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_car_hire.html#a963e57679d3ed4f5af7a3a0a9cd0c505">GetAvailable</a> (std::string const &amp;type=&quot;&quot;, std::string const &amp;manufacturer=&quot;&quot;)</td></tr>
<tr class="memdesc:a963e57679d3ed4f5af7a3a0a9cd0c505"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of available Cars of the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a> corresponding to type or manufacturer.  <a href="#a963e57679d3ed4f5af7a3a0a9cd0c505"></a><br/></td></tr>
<tr class="separator:a963e57679d3ed4f5af7a3a0a9cd0c505"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f9762b45ff5b0818c7478b34db2b5ef"><td class="memItemLeft" align="right" valign="top">TCars&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_car_hire.html#a2f9762b45ff5b0818c7478b34db2b5ef">GetReserved</a> (std::string const &amp;type=&quot;&quot;, std::string const &amp;manufacturer=&quot;&quot;)</td></tr>
<tr class="memdesc:a2f9762b45ff5b0818c7478b34db2b5ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of reserved Cars of the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a> corresponding to type or manufacturer.  <a href="#a2f9762b45ff5b0818c7478b34db2b5ef"></a><br/></td></tr>
<tr class="separator:a2f9762b45ff5b0818c7478b34db2b5ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84bd9cd7e504e244152f3794668b8915"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_car_hire.html#a84bd9cd7e504e244152f3794668b8915">MoveToAvailable</a> (<a class="el" href="class_i_car.html">ICar</a> *car)</td></tr>
<tr class="memdesc:a84bd9cd7e504e244152f3794668b8915"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move a <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> of the car rental to available.  <a href="#a84bd9cd7e504e244152f3794668b8915"></a><br/></td></tr>
<tr class="separator:a84bd9cd7e504e244152f3794668b8915"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a810a9fed40faeb455ac640e6f5733125"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_car_hire.html#a810a9fed40faeb455ac640e6f5733125">PrintAvailable</a> (std::ostream &amp;stream)</td></tr>
<tr class="memdesc:a810a9fed40faeb455ac640e6f5733125"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints all available Cars of the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a>.  <a href="#a810a9fed40faeb455ac640e6f5733125"></a><br/></td></tr>
<tr class="separator:a810a9fed40faeb455ac640e6f5733125"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e3356f2fc6c1fbf48675b37a0e2e54d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_car_hire.html#a3e3356f2fc6c1fbf48675b37a0e2e54d">PrintReserved</a> (std::ostream &amp;stream)</td></tr>
<tr class="memdesc:a3e3356f2fc6c1fbf48675b37a0e2e54d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prints all reserved Cars of the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a>.  <a href="#a3e3356f2fc6c1fbf48675b37a0e2e54d"></a><br/></td></tr>
<tr class="separator:a3e3356f2fc6c1fbf48675b37a0e2e54d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6de64578813cfe3b39c7fc2f607a5930"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_car_hire.html#a6de64578813cfe3b39c7fc2f607a5930">Reserve</a> (<a class="el" href="class_i_car.html">ICar</a> *car)</td></tr>
<tr class="memdesc:a6de64578813cfe3b39c7fc2f607a5930"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reserve a <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> of the car rental.  <a href="#a6de64578813cfe3b39c7fc2f607a5930"></a><br/></td></tr>
<tr class="separator:a6de64578813cfe3b39c7fc2f607a5930"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_object"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_object')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_object.html">Object</a></td></tr>
<tr class="memitem:aa3e791419d84c4c346ef9499513b8e00 inherit pub_methods_class_object"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_object.html#aa3e791419d84c4c346ef9499513b8e00">~Object</a> ()</td></tr>
<tr class="memdesc:aa3e791419d84c4c346ef9499513b8e00 inherit pub_methods_class_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">DTor of the <a class="el" href="class_object.html" title="Header for the Object class.">Object</a> class.  <a href="#aa3e791419d84c4c346ef9499513b8e00"></a><br/></td></tr>
<tr class="separator:aa3e791419d84c4c346ef9499513b8e00 inherit pub_methods_class_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_class_object"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_class_object')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="class_object.html">Object</a></td></tr>
<tr class="memitem:a86a84ed2d1207e5f8827165ac2941106 inherit pub_static_methods_class_object"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_object.html#a86a84ed2d1207e5f8827165ac2941106">deleteObject</a> (<a class="el" href="class_object.html">Object</a> *obj)</td></tr>
<tr class="memdesc:a86a84ed2d1207e5f8827165ac2941106 inherit pub_static_methods_class_object"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees the memory used by obj.  <a href="#a86a84ed2d1207e5f8827165ac2941106"></a><br/></td></tr>
<tr class="separator:a86a84ed2d1207e5f8827165ac2941106 inherit pub_static_methods_class_object"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Header for the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a> class. </p>
<p><a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a> manages all Cars</p>
<p>The <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a> class is able to add a new <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> to the car rental, reserve Cars or move them to available and prints them to ostream.</p>
<dl class="section author"><dt>Author</dt><dd>Andreas Lehner </dd></dl>
<dl class="section date"><dt>Date</dt><dd>22.11.2012 </dd></dl>

<p>Definition at line <a class="el" href="_car_hire_8h_source.html#l00022">22</a> of file <a class="el" href="_car_hire_8h_source.html">CarHire.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2a854d25beaa86f93eeaa88eb409f9d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CarHire::Add </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_i_car.html">ICar</a> *&#160;</td>
          <td class="paramname"><em>car</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds a new <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> to the car rental. </p>
<p>This function adds a ICar* to a list of ICar* with push_back(). When adding new ICar* it is always added to the list of available cars. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">car</td><td>The car that is being added to the list of ICar* </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>if the pointer is invalid </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_car_hire_8cpp_source.html#l00006">6</a> of file <a class="el" href="_car_hire_8cpp_source.html">CarHire.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a963e57679d3ed4f5af7a3a0a9cd0c505"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TCars CarHire::GetAvailable </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>type</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>manufacturer</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a list of available Cars of the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a> corresponding to type or manufacturer. </p>
<p>This function returns the list of available cars corresponding to type or manufacturer. These two values also have default values if the cars of all manufacturers and types, respectively should be given back. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>A string holding the type of a car </td></tr>
    <tr><td class="paramname">manufacturer</td><td>A string holding the manufacturer of a car </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TCars A list of ICars* holding the requested cars </dd></dl>

<p>Definition at line <a class="el" href="_car_hire_8cpp_source.html#l00042">42</a> of file <a class="el" href="_car_hire_8cpp_source.html">CarHire.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a2f9762b45ff5b0818c7478b34db2b5ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TCars CarHire::GetReserved </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>type</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>manufacturer</em> = <code>&quot;&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a list of reserved Cars of the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a> corresponding to type or manufacturer. </p>
<p>This function returns the list of reserved cars corresponding to type or manufacturer. These two values also have default values if the cars of all manufacturers and types, respectively should be given back. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>A string holding the type of a car </td></tr>
    <tr><td class="paramname">manufacturer</td><td>A string holding the manufacturer of a car </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TCars A list of ICars* holding the requested cars </dd></dl>

<p>Definition at line <a class="el" href="_car_hire_8cpp_source.html#l00050">50</a> of file <a class="el" href="_car_hire_8cpp_source.html">CarHire.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a84bd9cd7e504e244152f3794668b8915"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CarHire::MoveToAvailable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_i_car.html">ICar</a> *&#160;</td>
          <td class="paramname"><em>car</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move a <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> of the car rental to available. </p>
<p>The function moves a reserved <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> from the list of reserved cars to the list of available cars. The <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> will be removed on the reserved list and added on the available list with push_back(). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">car</td><td>The <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> that is going to be available and is at the moment in the list of reserved cars </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>if the pointer is invalid </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_car_hire_8cpp_source.html#l00073">73</a> of file <a class="el" href="_car_hire_8cpp_source.html">CarHire.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a810a9fed40faeb455ac640e6f5733125"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CarHire::PrintAvailable </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Prints all available Cars of the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a>. </p>
<p>All cars that are listed in the list of available cars will be printed in the order the cars have been added to the list. First element printed = first element added. It is able to print the result to any ostream passed through. It is printing all information a car has which includes Price of the car (including extras), manufacturer, type and its extras. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>The ostream where the cars will be printed to. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_car_hire_8cpp_source.html#l00014">14</a> of file <a class="el" href="_car_hire_8cpp_source.html">CarHire.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3e3356f2fc6c1fbf48675b37a0e2e54d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CarHire::PrintReserved </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>stream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Prints all reserved Cars of the <a class="el" href="class_car_hire.html" title="Header for the CarHire class.">CarHire</a>. </p>
<p>All cars that are listed in the list of reserved cars will be printed in the order the cars have been added to the list. First element printed = first element added. It is able to print the result to any ostream passed through. It is printing all information a car has which includes Price of the car (including extras), manufacturer, type and its extras. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stream</td><td>The ostream where the cars will be printed to. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_car_hire_8cpp_source.html#l00028">28</a> of file <a class="el" href="_car_hire_8cpp_source.html">CarHire.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a6de64578813cfe3b39c7fc2f607a5930"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CarHire::Reserve </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_i_car.html">ICar</a> *&#160;</td>
          <td class="paramname"><em>car</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reserve a <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> of the car rental. </p>
<p>The function moves an available <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> from the list of available cars to the list of reserved cars. The <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> will be removed on the available list and added on the reserved list with push_back(). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">car</td><td>The <a class="el" href="class_car.html" title="Header for the Car class.">Car</a> that is going to be reserved and is at the moment in the list of available cars </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">exception</td><td>if the pointer is invalid </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_car_hire_8cpp_source.html#l00058">58</a> of file <a class="el" href="_car_hire_8cpp_source.html">CarHire.cpp</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_car_hire.html">CarHire</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
